package com.zcl.springboot.hello.service.impl;

import com.zcl.springboot.hello.bean.User;
import com.zcl.springboot.hello.mapper.HelloMapper;
import com.zcl.springboot.hello.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class HelloServiceImpl implements HelloService {
    @Autowired
    HelloMapper helloMapper;
    @Override
    public User getUserInfo(String name, String password) {
        return helloMapper.getUserInfo(name,password);
    }

    @Override
    @Transactional
    public void insertUser(User user) {
        helloMapper.insertUser(user);
        System.out.println(10/0);
    }
}
